Retrieve route templates for a specific hub. Optionally filter by route template ID or name.
Rate limit: 10 requests/sec (learn more about rate limits here).
To use this endpoint, select Read Routes under the Driver Workflow category when creating or editing an API token. Learn More.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
curl --request GET \
--url https://api.samsara.com/hub/route-templates \
--header 'Authorization: Bearer <token>'{
"data": [
{
"createdAtTime": "2024-01-15T10:30:00Z",
"distanceMeters": 15000,
"durationSeconds": 3600,
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"hubTimezone": "America/Los_Angeles",
"id": "660e8400-e29b-41d4-a716-446655440001",
"locations": [
{
"formattedAddress": "456 Main St, Los Angeles, CA 90210, US",
"id": "850e8400-e29b-41d4-a716-446655440003",
"latitude": 34.0522,
"longitude": -118.2437,
"name": "Customer ABC Warehouse",
"position": 1,
"externalId": "LOC-123"
}
],
"name": "Downtown Delivery Route",
"updatedAtTime": "2024-01-15T12:00:00Z",
"defaultDepotEnd": {
"formattedAddress": "123 Industrial Blvd, Los Angeles, CA 90210, US",
"id": "750e8400-e29b-41d4-a716-446655440002",
"latitude": 34.0522,
"longitude": -118.2437,
"name": "Main Warehouse",
"externalId": "DEPOT-001"
},
"defaultDepotStart": {
"formattedAddress": "123 Industrial Blvd, Los Angeles, CA 90210, US",
"id": "750e8400-e29b-41d4-a716-446655440002",
"latitude": 34.0522,
"longitude": -118.2437,
"name": "Main Warehouse",
"externalId": "DEPOT-001"
},
"earliestStartTime": "08:00"
}
],
"pagination": {
"endCursor": "MjkY",
"hasNextPage": true
}
}Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The hub identifier.
Filter by a specific route template ID.
Filter by route template name (exact match).
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
The limit for how many objects will be in the response. Default and max for this value is 100 objects.
1 <= x <= 100curl --request GET \
--url https://api.samsara.com/hub/route-templates \
--header 'Authorization: Bearer <token>'{
"data": [
{
"createdAtTime": "2024-01-15T10:30:00Z",
"distanceMeters": 15000,
"durationSeconds": 3600,
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"hubTimezone": "America/Los_Angeles",
"id": "660e8400-e29b-41d4-a716-446655440001",
"locations": [
{
"formattedAddress": "456 Main St, Los Angeles, CA 90210, US",
"id": "850e8400-e29b-41d4-a716-446655440003",
"latitude": 34.0522,
"longitude": -118.2437,
"name": "Customer ABC Warehouse",
"position": 1,
"externalId": "LOC-123"
}
],
"name": "Downtown Delivery Route",
"updatedAtTime": "2024-01-15T12:00:00Z",
"defaultDepotEnd": {
"formattedAddress": "123 Industrial Blvd, Los Angeles, CA 90210, US",
"id": "750e8400-e29b-41d4-a716-446655440002",
"latitude": 34.0522,
"longitude": -118.2437,
"name": "Main Warehouse",
"externalId": "DEPOT-001"
},
"defaultDepotStart": {
"formattedAddress": "123 Industrial Blvd, Los Angeles, CA 90210, US",
"id": "750e8400-e29b-41d4-a716-446655440002",
"latitude": 34.0522,
"longitude": -118.2437,
"name": "Main Warehouse",
"externalId": "DEPOT-001"
},
"earliestStartTime": "08:00"
}
],
"pagination": {
"endCursor": "MjkY",
"hasNextPage": true
}
}